home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_09
/
1109060a
< prev
next >
Wrap
Text File
|
1993-07-06
|
524b
|
25 lines
// winstrm.h
#include "ostrwnd.h"
const int winstreambuf_buf_size = 128;
class winstreambuf : public streambuf
{
public:
winstreambuf ();
virtual int sync ();
virtual int overflow (int nCh);
virtual int underflow ()
{return EOF;}
void set_stream_window (ostreamWnd * wnd)
{stream_window = wnd;}
private:
void reset_buffer ()
{setp (buffer, buffer + winstreambuf_buf_size - 2);}
// Keep epptr within buffer!
char buffer [winstreambuf_buf_size];
ostreamWnd * stream_window;
};